package com.hundsun.cprs.yyt.service.account.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.hundsun.cprs.yyt.service.account.domain.Account;
import com.hundsun.cprs.yyt.service.account.domain.query.AccountQuery;

public interface AccountDao {
    int deleteByPrimaryKey(Long id);

    int insert(Account record);

    int insertSelective(Account record);

    Account selectByPrimaryKey(Long id);
    
    int updateByPrimaryKeySelective(Account record);

    int updateByPrimaryKey(Account record);
    
    int updateQuotaByUserId(@Param("userId")Long userId,@Param("amount")Long amount);
    
    List<Account> selectByQuery(AccountQuery query);

    Account selectByUserId(Long userId);
    
    long sumRemainingQuotaByQuery(AccountQuery query);

    Account selectByFundAccount(String fundAccount);

}